using UnityEngine;
using System.Collections;

public class MenuPrincipal : MonoBehaviour
{
	public GUIStyle menu;
	public GUIStyle jugar;
	public GUIStyle info;
	public GUIStyle salir;
	
	
	// Use this for initialization
	void Start()
	{

	}

	// Update is called once per frame
	void Update()
	{

	}

	void OnGUI()
	{
		//hacemos esto porque las imagenes están a 320 x 480 y asi lo cuadramos
		float lfWidth = (float)Screen.width / 320.0f;
		float lfHeight = (float)Screen.height / 480.0f;
		
		
		GUI.Label(new Rect(0, 0, Screen.width, Screen.height), "", menu);
		
				
		if ((GUI.Button(new Rect(30 * lfWidth, 180 * lfHeight, 126 * lfWidth, 38 * lfHeight), "", jugar)) || (Input.GetKeyDown("escape")))
		{
			Application.LoadLevel(1);
		}

		if ((GUI.Button(new Rect(40 * lfWidth, 280 * lfHeight, 93 * lfWidth, 38 * lfHeight), "", info)) || (Input.GetKeyDown("escape")))
		{
			Application.Quit();
		}

		if ((GUI.Button(new Rect(50 * lfWidth, 380 * lfHeight, 110 * lfWidth, 39 * lfHeight), "", salir)) || (Input.GetKeyDown("escape")))
		{
			Application.Quit();
		}


	}
}
